//
//  Meal.m
//  MensaViewer
//
//  Created by Markus Dauberschmidt on 06.04.11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Meal.h"

@implementation Meal
@synthesize name, price, tags;

- (id) initWithName: (NSString*)n andPrice: (NSString*)p {
    NSMutableString *nn = [n mutableCopy];
    NSRange r = [n rangeOfString:@"(f)"];
    if (r.length != 0)
    {
        self.tags = @"fleischlos";
        [nn replaceCharactersInRange:r withString:@""];
        self.name = nn;
    }
    else
    {
        self.name = n;
    }
    

    self.price = p;
    
    [nn release];
    
    return self;
}

@end
